const express = require('express');
const textRouter = require('./text/index');
const userRouter = require('./system/user');
const roleRouter = require('./system/role');
const menuRouter = require('./system/menu');
const ArticleRouter = require('./system/article');
const NavRouter = require('./system/nav');

const userController = require('../multer/UserController');

const router = express.Router(); // 注册路由 



router.use('/', textRouter); // 注入用户路由模块
router.use('/api', userRouter); // 注入用户路由模块
router.use('/api', roleRouter); // 注入角色路由
router.use('/api', ArticleRouter); // 注入文章路由
router.use('/api', NavRouter); // 注入导航路由

router.post('/api/upload', userController.upload) // 上传图片

module.exports = router;
